//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package test.TargetTest;

import java.io.PrintStream;
import java.util.Random;

public class WritingGrapple {
    private String name;
    private int blood;

    public WritingGrapple() {
    }

    public WritingGrapple(String name, int blood) {
        this.name = name;
        this.blood = blood;
    }

    public void attack(WritingGrapple target) {
        Random rand = new Random();
        int hurt = rand.nextInt(30) + 1;
        int overplusBool = target.getBlood() - hurt;
        overplusBool = overplusBool < 0 ? 0 : overplusBool;
        target.setBlood(overplusBool);
        PrintStream var10000 = System.out;
        String var10001 = this.getName();
        var10000.println(var10001 + "挥拳打了" + target.getName() + "一下，造成" + hurt + "点伤害," + target.getName() + "还剩下" + overplusBool + "血");
    }

    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getBlood() {
        return this.blood;
    }

    public void setBlood(int blood) {
        this.blood = blood;
    }

    public String toString() {
        return "WritingGrapple{name = " + this.name + ", blood = " + this.blood + "}";
    }
}
